<template>
<div class="wrapper">
    <swiper :options="swiperOption"  >
    <swiper-slide v-for="item of swiperList" :key="item.Id">
        <img class="swiper-img" :src="item.imgUrl"/>
    </swiper-slide>
    <div class="swiper-pagination"  slot="pagination"></div>
  </swiper>
</div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true,
        autoplay: 3000,
        speed: 300
      },
      swiperList: [
        {
          id: '0001',
          imgUrl:
            'http://img1.qunarzz.com/piao/fusion/1805/90/fdadc13b2b9bfa02.jpg_750x200_6d0b21d5.jpg'
        },
        {
          id: '002',
          imgUrl:
            'http://img1.qunarzz.com/piao/fusion/1802/aa/36b13874a1ed9602.jpg_750x200_0abb8860.jpg'
        },
        {
          id: '003',
          imgUrl:
            'http://img1.qunarzz.com/piao/fusion/1805/3b/ef86879aa50e3002.jpg_750x200_2a108508.jpg'
        }
      ]
    }
  }
}
</script>

<style lang="stylus" scoped>
  .wrapper >>>.swiper-pagination-bullet-active
    background #fff
  .wrapper
    overflow  hidden
    width 100%
    height 0
    padding-bottom 26.66%
    background#eee
    .swiper-img
       width 100%
</style>
